import axios from '@/utils/request'

// 查询所有部门
export function get_company_department() {
  return axios({
    url: '/company/department',
    method: 'get'
  })
}

// 删除部门
export function del_company_department(id) {
  return axios({
    url: `/company/department/${id}`,
    method: 'delete'
  })
}

// 根据ID查询部门详情
export function get_departmentdetails(id) {
  return axios({
    url: `/company/department/${id}`,
    method: 'get'
  })
}

// 根据ID编辑部门详情
export function edit_company_department(id, data) {
  return axios({
    url: `/company/department/${id}`,
    method: 'put',
    data
  })
}

// 新增部门
export function add_company_department(data) {
  return axios({
    url: '/company/department/',
    method: 'post',
    data
  })
}

// 获取所有负责人列表
export function get_user_simple() {
  return axios({
    url: '/sys/user/simple',
    method: 'get'
  })
}
